<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>代排队订单管理</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('Bdrun/queue_list')}">
        订单号：<input type="text" name="order_number" style="width: 100px;" value="{$formget.order_number}">
        下单时间：
        <input type="text" name="start_time" class="js-date" value="{$formget.start_time|default=''}" style="width: 90px;" autocomplete="off">-
        <input type="text" class="js-date" name="end_time" value="{$formget.end_time}" style="width: 90px;" autocomplete="off"> &nbsp; &nbsp;
        &nbsp;&nbsp;订单状态：
        <select class="select_2" name="status"  style="width: 80px;" >
            <option value='-1'{:I("post.status")==null?selected:''}>全部</option>
            <option value='0'{:I("post.status")==0?selected:''}>未处理</option>
            <option value='1'{:I("post.status")==1?selected:''}>待分配</option>
            <option value='2'{:I("post.status")==2?selected:''}>已分配</option>
            <option value='3'{:I("post.status")==3?selected:''}>已到达</option>
            <option value='4'{:I("post.status")==4?selected:''}>已拍照</option>
            <option value='7'{:I("post.status")==5?selected:''}>已完成</option>
            <option value='9'{:I("post.status")==9?selected:''}>已取消</option>
        </select> &nbsp;&nbsp;
        <input type="submit" class="btn btn-primary" value="搜索" />
    </form>
    <form class="js-ajax-form" action="" method="post">

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
                <th align="center">序号</th>
                <th>订单号</th>
                <th>代排队类型</th>
                <th>用户姓名</th>
                <th>跑客姓名</th>
                <th>订单金额</th>
                <th>代排队时间</th>
                <th>代排队时长</th>
                <th>订单状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <php>
                $order_status=array("0"=>'未处理',"1"=>'待分配',"2"=>'已分配',"3"=>'已到达',"4"=>'已拍照',"5"=>'已完成',"9"=>'已取消');

            </php>
            <foreach name="datas" item="vo" key="k">
                <tr>
                    <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.queue_id}" title="ID:{$vo.queue_id}"></td>
                   <td align="center">{$k+1}</td>
                    <td>{$vo['order_number']}</td>
                    <td>{$vo['queue_type']}</td>
                    <td>{$vo['user_id']|getUserNameForType=1}</td>
                    <td>{$vo['dispatch_id']|getUserNameForType=2}</td>
                    <td>{$vo['order_money']}</td>
                    <td>{$vo['queue_time']}</td>
                    <td>{$vo['hour_long']}</td>
                    <td>{$order_status[$vo['status']]}</td>
                    <td>
                        <a href="{:U('bdrun/queue_show',array('queue_id'=>empty($vo['queue_id'])?'':$vo['queue_id']))}">查看</a>

                        |<a href="#" onclick="push_reload($vo['queue_id']);" style="color: red">重发</a></td>

                </tr>
            </foreach>
            </tbody>
        </table>
        <if condition="empty($datas)">
            <div style="padding: 30px;text-align: center;color: #999999">
                <i class="fa fa-database" style="font-size: 38px"></i><br />
                暂无数据
            </div>
        </if>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    function push_reload(pueue_id){
        layer.open({
            type: 2,
            title: '重新发单提示',
            shadeClose: true,
            shade: 0.8,
            area: ['380px', '30%'],
            content: '{:U("Bdrun/push_server_data")}&queue_id='+pueue_id //iframe的url
        });

    }
</script>
</body>
</html